<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body onload="windowOnload();" style="overflow: hidden">
<!--此iframe用于展示子页面的区域-->
<iframe id="iframepage" name="list2" width="100%" height="100%"scrolling="auto"  border="0" frameborder="0" marginheight="0" marginwidth="0"></iframe>
<!--此div用于展示遮罩区-->
<div id="divMask" style="filter:Alpha(opacity=30);display:none;background-color:#ffffff;position:absolute;top:0;left:0;z-index:1;"></div>
<!--此div用于展示进度条的图片-->
<div id="divLoad" style="display:none;position:absolute;z-index:4;">
    <img src="image/2.gif">
</div>
</body>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script type="text/javascript">
    //页面初始化
    function windowOnload(){
        showMask();
        var url = "XX.do";
        window.list2.location.href=url;
    }
    //加载loading
    function showMask(){
        var divMask = document.getElementById("divMask");
        var divLoad = document.getElementById("divLoad");
        divMask.style.display="block";
        var vwidth = document.body.offsetWidth+20;
        var vheitht = document.body.offsetHeight;
        divMask.style.width=vwidth;
        divMask.style.height=vheitht;
        divLoad.style.display="block";
        divLoad.style.top=(vheitht-200)/2;
        divLoad.style.left=(vwidth-200)/2;
    }
    //隐藏loading
    function hideMask(){
        var divMask = document.getElementById("divMask");
        var divLoad = document.getElementById("divLoad");
        divMask.style.display="none";
        divLoad.style.display="none";
    }
</script>
</html>